<div class="list-group-item">
    <img class="mr-3 rounded" src="{{ $user->avatar }}"  alt="{{ $user->name }}" width=50>
    <a class="text-decoration-none" href="{{ route('user.show', $user) }}">
        {{ $user->name }}
    </a>
    <span>&nbsp;email:{{$user->email}}</span>
    <span>&nbsp;创建时间:{{$user->created_at->diffForHumans()}}</span>
    @can('destroy', $user)
        <form action="{{ route('user.destroy', $user->id) }}" method="post" class="float-end"
              onsubmit="return confirm('您确定要删除该用户吗？');"
        >
            {{ csrf_field() }}
            {{ method_field('DELETE') }}
            <button type="submit" class="btn btn-sm btn-danger delete-btn">删除</button>
        </form>
    @endcan
</div>
